/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idv.cloudee.proxy2.impl.connect;

import com.cirnoworks.http.utils.HeaderRequest;
import com.cirnoworks.http.utils.exception.BadRequestException;
import idv.cloudee.proxy2.framework.ProxyThread;
import idv.cloudee.proxy2.intf.RequestDealer;
import idv.cloudee.proxy2.intf.RequestDealerFactory;

/**
 *
 * @author Cloudee
 */
public class ConnectDealerFactory implements RequestDealerFactory {

    private String proxyAddress;
    private int proxyPort;

    public String getProxyAddress() {
        return proxyAddress;
    }

    public void setProxyAddress(String proxyAddress) {
        this.proxyAddress = proxyAddress;
    }

    public int getProxyPort() {
        return proxyPort;
    }

    public void setProxyPort(int proxyPort) {
        this.proxyPort = proxyPort;
    }

    public RequestDealer getRequestDealer(HeaderRequest reqHeaderParam, ProxyThread thread) throws BadRequestException {
        ConnectDealer cd = new ConnectDealer();
        cd.setProxyAddress(proxyAddress);
        cd.setProxyPort(proxyPort);
        return cd;
    }
}
